﻿namespace TanzimSaqib.NoBrainer.Sample.Account
{
    using System.Web.UI;
    using System.Web.Security;
    using System;
    using Controllers;
    using DataAccess;

    public partial class Manage : ViewBase<BlogController, Blog>
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack) 
                return;

            Model.UserId = (Guid)Membership.GetUser().ProviderUserKey;
            InvokeController(v => Controller.ManagePostsLoad(Model));

            GridView1.DataSource = Model.PostList;
            GridView1.DataBind();
        }

        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            //var postId = (int)GridView1.SelectedValue;
        }
    }
}